package com.ymxk.timestar.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn_drag_linear1).setOnClickListener(v -> jumpActivity(MatrixImageLayoutActivity.class));
        findViewById(R.id.btn_drag_linear).setOnClickListener(v -> jumpActivity(StarAtlasSelectActivity.class));
        findViewById(R.id.btn).setOnClickListener(v -> LocationInWindowActivity.jumpTo(this));
        findViewById(R.id.btnScreen).setOnClickListener(v -> LocationInScreenActivity.jumpTo(this));
        findViewById(R.id.btnViewGroup).setOnClickListener(v -> LocationInViewGroupActivity.jumpTo(this));
        findViewById(R.id.btnViewGroupCenter).setOnClickListener(v -> ViewGroupCenterActivity.jumpTo(this));
        findViewById(R.id.btnRecyclerView).setOnClickListener(v -> RecyclerTranslationActivity.jumpTo(this));

        RecyclerTranslationActivity.jumpTo(this);
    }

    private void jumpActivity(Class<? extends Activity> cls) {
        Intent intent = new Intent(this, cls);
        startActivity(intent);
    }
}
